package com.munhrasoft.dinamica.business.entities;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;

@Entity
@NamedQueries(value = { @NamedQuery(name = "findAllCNotasLines", query = "SELECT lines FROM CustoCNotas lines"),
                        @NamedQuery(name = "findCusto", query = "SELECT line FROM CustoCNotas line where " +
                        		":valor >= line.intervalomin and :valor <= line.intervalomax") })
@SequenceGenerator(name = "custonotasSeq", initialValue = 1, allocationSize = 1)
public class CustoCNotas {

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "custonotasSeq")
    private int    id_custonotas;
    private double intervalomin;
    private double intervalomax;
    private double custo;

    public int getId_custonotas() {
        return id_custonotas;
    }

    public void setId_custonotas(int id_custonotas) {
        this.id_custonotas = id_custonotas;
    }

    public double getIntervalomin() {
        return intervalomin;
    }

    public void setIntervalomin(double intervalomin) {
        this.intervalomin = intervalomin;
    }

    public double getIntervalomax() {
        return intervalomax;
    }

    public void setIntervalomax(double intervalomax) {
        this.intervalomax = intervalomax;
    }

    public double getCusto() {
        return custo;
    }

    public void setCusto(double custo) {
        this.custo = custo;
    }

}
